The present invention relates generally to printers, and more particularly to a method and apparatus for optimizing memory access for image processing. Printers have become very popular in recent times due to their greatly improved ability to print clear images. Generally, printers are available as monochrome only printers, such as printers that print only in gray and black, or color printers that print in color as well as monochrome. These printers operate by converting an image on a client device such as a personal computer into data that is received by a formatter that stores the data in the printer. The formatter generates coded data representing the image, which is then transmitted by the formatter to a print engine that drives the mechanisms of the printer to convert the data back into an image that is printed on a print medium, such as paper. Similar procedures can be followed for generating images for displaying on devices such as computer monitors.
Printing devices and display devices that are used by computers and by computer-related devices, such as digital cameras, generally utilize a two-dimensional matrix of image elements or pixels. Each pixel in a color image matrix, for example, comprises a Red (“R”), Green (“G”), and Blue (“B”) cell. Each such cell is represented by a corresponding memory cell that may store a numeric value. Memory cell values may typically be 8, 10, or 12 bits in size, or may be stored in any other convenient size. The memory cell values for the colors of each pixel may be stored separately in the computer memory, or may be merged into a single memory address location. A computer program can then cause a particular pixel to be printed in any visible color, or to appear black or white, by setting the numeric values of its red, green, and blue cells to appropriate values for the printer.
In many products and applications, some of the pixel information is generated or “interpolated” by a computer microprocessor (“CPU”), based on other information. This processing of the pixel information improves the overall quality of the printed image produced by the printer.
Depending upon the type of printer being utilitized, the processing may be used, for example, to remove artifacts from the image, such as “toner explosion”. (“Toner explosion” refers to toner that is scattered when moisture in the media suddenly vaporizes.) The processing may also be used to calibrate the image information for the printer to adjust for particular printer characteristics so that the final printed image faithfully reproduces the original image. The processing can also be used to enhance the printed image to improve it over the original image, for example, by the removal of “red eye” in a photograph.
Such artifact removal, image enhancement, resolution enhancement, and so forth, is performed serially on the image data on a pixel-by-pixel basis. In one process, the pixels are individually “windowed” by selecting a small window or matrix of the pixels that surround and include the pixel that is being processed. The particular processing that is then performed on the selected (or “current” or “target”) pixel is then based on the values of the surrounding pixels.
Unfortunately, the image enhancement information is not stored in memory in a manner that efficiently supports such pixel windowing processing. Rather, image information is typically stored on a row-by-row basis, moving progressively from the top edge of the page to the bottom, for example. Therefore, it is necessary to read the entire data for all the lines in which the pixel window is located in order to collect the information for just the few pixels that form the window that actually surrounds the target pixel. This major quantity of data needs to be read just to construct the small window matrix of pixels so that the target pixel can be processed. Thus a large amount of information must be inefficiently read and discarded simply to extract or recover the relatively small amount of information needed for processing a particular pixel. The problem is then compounded because essentially the same information must then be read and discarded again and again for each successive cache line width of pixels and pixel windows.
The amount of information that must be repeatedly retrieved by this process is much greater than can be held in the high-speed cache memory of the computer processor. Computer processing time is therefore wasted while the processor has to wait each time for the information to be retrieved from the slower general memory of the computer. The delays can be even worse if the information must be retrieved from yet far slower storage such as, for example, a hard disk drive.
Thus, to support ever-increasing printer operating speeds, prior solutions have resorted to increasingly expensive specialized hardware solutions, such as large, dedicated, high-speed memories (e.g., high-speed SRAMs). Such solutions, however, cause ever-increasing hardware and manufacturing costs, whereas the historical trend in the industry has been the opposite—declining costs accompanied by increasing performance.
Thus, a need still remains for faster, more efficient, more effective, and less expensive methods and mechanisms for optimizing memory access for image processing. In view of the continuing increases in performance, capabilities, and customer expectations, accompanied by ever-increasing competition and declining prices, it is ever more and more critical that answers be found to these problems.
Solutions to these problems have been long sought but prior developments have not taught or suggested any solutions and, thus, solutions to these problems have long eluded those skilled in the art.